package p046bf;

import okhttp3.OkHttpClient;
import p056bp.ZonedDateTime;
import p073cf.RuntimeTypeAdapterFactory;
import p073cf.ZonedDateTimeDeserializer;
import p232id.ObservableHide;
import p270jp.pxv.android.model.pixiv_sketch.AudienceCountUpdatedMessage;
import p270jp.pxv.android.model.pixiv_sketch.CaptionMessage;
import p270jp.pxv.android.model.pixiv_sketch.ChatMessage;
import p270jp.pxv.android.model.pixiv_sketch.EnterMessage;
import p270jp.pxv.android.model.pixiv_sketch.FinishMessage;
import p270jp.pxv.android.model.pixiv_sketch.GiftingMessage;
import p270jp.pxv.android.model.pixiv_sketch.HeartMessage;
import p270jp.pxv.android.model.pixiv_sketch.LeaveMessage;
import p270jp.pxv.android.model.pixiv_sketch.LiveWebSocketMessage;
import p270jp.pxv.android.model.pixiv_sketch.PerformerThumbnailMessage;
import p270jp.pxv.android.model.pixiv_sketch.StreamMessage;
import p363nb.C4929j;
import p363nb.FieldNamingPolicy;
import p363nb.GsonBuilder;
import p517td.PublishSubject;
import p593wc.AbstractC6902j;
import p671zc.CompositeDisposable;

/* compiled from: LiveWebSocketClient.java */
/* renamed from: bf.c */
/* loaded from: classes2.dex */
public class C1122c {

    /* renamed from: a */
    public String f4980a;

    /* renamed from: b */
    public OkHttpClient f4981b;

    /* renamed from: c */
    public C4929j f4982c;

    /* renamed from: d */
    public CompositeDisposable f4983d = new CompositeDisposable();

    /* renamed from: e */
    public PublishSubject<AudienceCountUpdatedMessage> f4984e;

    /* renamed from: f */
    public AbstractC6902j<AudienceCountUpdatedMessage> f4985f;

    /* renamed from: g */
    public PublishSubject<ChatMessage> f4986g;

    /* renamed from: h */
    public AbstractC6902j<ChatMessage> f4987h;

    /* renamed from: i */
    public PublishSubject<HeartMessage> f4988i;

    /* renamed from: j */
    public AbstractC6902j<HeartMessage> f4989j;

    /* renamed from: k */
    public PublishSubject<EnterMessage> f4990k;

    /* renamed from: l */
    public AbstractC6902j<EnterMessage> f4991l;

    /* renamed from: m */
    public PublishSubject<LeaveMessage> f4992m;

    /* renamed from: n */
    public AbstractC6902j<LeaveMessage> f4993n;

    /* renamed from: o */
    public PublishSubject<StreamMessage> f4994o;

    /* renamed from: p */
    public AbstractC6902j<StreamMessage> f4995p;

    /* renamed from: q */
    public PublishSubject<FinishMessage> f4996q;

    /* renamed from: r */
    public AbstractC6902j<FinishMessage> f4997r;

    /* renamed from: s */
    public PublishSubject<CaptionMessage> f4998s;

    /* renamed from: t */
    public AbstractC6902j<CaptionMessage> f4999t;

    /* renamed from: u */
    public PublishSubject<GiftingMessage> f5000u;

    /* renamed from: v */
    public AbstractC6902j<GiftingMessage> f5001v;

    /* renamed from: w */
    public final PublishSubject<PerformerThumbnailMessage> f5002w;

    /* renamed from: x */
    public AbstractC6902j<PerformerThumbnailMessage> f5003x;

    public C1122c(String str, OkHttpClient okHttpClient) {
        PublishSubject<AudienceCountUpdatedMessage> bVar = new PublishSubject<>();
        this.f4984e = bVar;
        this.f4985f = new ObservableHide(bVar);
        PublishSubject<ChatMessage> bVar2 = new PublishSubject<>();
        this.f4986g = bVar2;
        this.f4987h = new ObservableHide(bVar2);
        PublishSubject<HeartMessage> bVar3 = new PublishSubject<>();
        this.f4988i = bVar3;
        this.f4989j = new ObservableHide(bVar3);
        PublishSubject<EnterMessage> bVar4 = new PublishSubject<>();
        this.f4990k = bVar4;
        this.f4991l = new ObservableHide(bVar4);
        PublishSubject<LeaveMessage> bVar5 = new PublishSubject<>();
        this.f4992m = bVar5;
        this.f4993n = new ObservableHide(bVar5);
        PublishSubject<StreamMessage> bVar6 = new PublishSubject<>();
        this.f4994o = bVar6;
        this.f4995p = new ObservableHide(bVar6);
        PublishSubject<FinishMessage> bVar7 = new PublishSubject<>();
        this.f4996q = bVar7;
        this.f4997r = new ObservableHide(bVar7);
        PublishSubject<CaptionMessage> bVar8 = new PublishSubject<>();
        this.f4998s = bVar8;
        this.f4999t = new ObservableHide(bVar8);
        PublishSubject<GiftingMessage> bVar9 = new PublishSubject<>();
        this.f5000u = bVar9;
        this.f5001v = new ObservableHide(bVar9);
        PublishSubject<PerformerThumbnailMessage> bVar10 = new PublishSubject<>();
        this.f5002w = bVar10;
        this.f5003x = new ObservableHide(bVar10);
        RuntimeTypeAdapterFactory aVar = new RuntimeTypeAdapterFactory(LiveWebSocketMessage.class, "type");
        aVar.m9743b(AudienceCountUpdatedMessage.class, LiveWebSocketMessage.TYPE_AUDIENCE_COUNT_UPDATED);
        aVar.m9743b(ChatMessage.class, LiveWebSocketMessage.TYPE_CHAT);
        aVar.m9743b(HeartMessage.class, LiveWebSocketMessage.TYPE_HEART);
        aVar.m9743b(EnterMessage.class, LiveWebSocketMessage.TYPE_ENTER);
        aVar.m9743b(LeaveMessage.class, LiveWebSocketMessage.TYPE_LEAVE);
        aVar.m9743b(StreamMessage.class, LiveWebSocketMessage.TYPE_STREAM);
        aVar.m9743b(FinishMessage.class, LiveWebSocketMessage.TYPE_FINISH);
        aVar.m9743b(CaptionMessage.class, LiveWebSocketMessage.TYPE_CAPTION);
        aVar.m9743b(GiftingMessage.class, LiveWebSocketMessage.TYPE_GIFTING);
        aVar.m9743b(PerformerThumbnailMessage.class, LiveWebSocketMessage.TYPE_PERFORMER_THUMBNAIL);
        GsonBuilder kVar = new GsonBuilder();
        kVar.f23291c = FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES;
        kVar.f23295g = "yyyy-MM-dd'T'HH:mm:ss";
        kVar.m3433b(ZonedDateTime.class, new ZonedDateTimeDeserializer());
        kVar.f23293e.add(aVar);
        this.f4982c = kVar.m3434a();
        this.f4980a = str;
        this.f4981b = okHttpClient;
    }
}
